{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from github import Github\n",
    "import re\n",
    "import time"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Github 账号和密码"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "access_token = \"\"\n",
    "with open(\"auth.txt\", \"r\") as f:\n",
    "    access_token = f.readline().replace('\\n', '')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用Github官方api获得repository的star数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "g = Github(access_token)\n",
    "pat = re.compile(r'[(](.*?)[)]', re.S)\n",
    "pl = re.compile(r'[.](.*?)[\\[]', re.S)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "文件名为:  lists.txt\n",
      "1 pytorch/text 2800+\n",
      "2 IBM/pytorch-seq2seq 1300+\n",
      "3 Sandeep42/anuvada 1000-\n",
      "4 pytorch/audio 1300+\n",
      "5 facebookresearch/loop 1000-\n",
      "404 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest/reference/repos#get-a-repository'}\n",
      "6 facebookresearch/fairseq-py null\n",
      "7 awni/speech 1000-\n",
      "8 OpenNMT/OpenNMT-py 5100+\n",
      "9 huggingface/neuralcoref 2300+\n",
      "10 NVIDIA/sentiment-discovery 1000+\n",
      "11 facebookresearch/MUSE 2800+\n",
      "12 lium-lst/nmtpytorch 1000-\n",
      "13 vincentherrmann/pytorch-wavenet 1000-\n",
      "14 soobinseo/Tacotron-pytorch 1000-\n",
      "15 allenai/allennlp 10300+\n",
      "16 PetrochukM/PyTorch-NLP 1900+\n",
      "17 outcastofmusic/quick-nlp 1000-\n",
      "18 mozilla/TTS 4900+\n",
      "19 facebookresearch/LASER 2800+\n",
      "20 pyannote/pyannote-audio 1100+\n",
      "21 Maluuba/gensen 1000-\n",
      "22 pytorch/translate 1000-\n",
      "23 espnet/espnet 3900+\n",
      "24 facebookresearch/pythia 4500+\n",
      "25 facebookresearch/UnsupervisedMT 1400+\n",
      "26 jsalt18-sentence-repl/jiant 1300+\n",
      "27 codertimo/BERT-pytorch 4300+\n",
      "28 facebookresearch/InferSent 2100+\n",
      "29 google/uis-rnn 1300+\n",
      "30 zalandoresearch/flair 10600+\n",
      "31 facebookresearch/pytext 6200+\n",
      "32 mindslab-ai/voicefilter 1000-\n",
      "33 kamalkraj/BERT-NER 1000-\n",
      "34 feedly/transfer-nlp 1000-\n",
      "35 asyml/texar-pytorch 1000-\n",
      "36 mravanelli/pytorch-kaldi 2000+\n",
      "37 NVIDIA/NeMo 2900+\n",
      "38 harvardnlp/pytorch-struct 1000-\n",
      "39 freewym/espresso 1000-\n",
      "40 huggingface/transformers 48900+\n",
      "41 lucidrains/reformer-pytorch 1500+\n",
      "42 enochkan/torch-metrics 1000-\n",
      "43 speechbrain/speechbrain 2600+\n",
      "44 backprop-ai/backprop 1000-\n",
      "45 pytorch/vision 9400+\n",
      "46 tymokvo/pt-styletransfer 1000-\n",
      "47 thnkim/OpenFacePytorch 1000-\n",
      "48 felixgwu/img_classification_pk_pytorch 1000-\n",
      "49 facebookresearch/SparseConvNet 1400+\n",
      "50 automan000/Convolution_LSTM_pytorch 1000-\n",
      "51 1adrianb/face-alignment 5000+\n",
      "52 ZijunDeng/pytorch-semantic-segmentation 1500+\n",
      "53 longcw/RoIAlign.pytorch 1000-\n",
      "54 creafz/pytorch-cnn-finetune 1000-\n",
      "55 ignacio-rocco/detectorch 1000-\n",
      "56 mdbloice/Augmentor 4400+\n",
      "57 jonas-koehler/s2cnn 1000-\n",
      "58 donnyyou/torchcv 2100+\n",
      "59 facebookresearch/maskrcnn-benchmark 8400+\n",
      "60 osmr/imgclsmob 2200+\n",
      "61 perone/medicaltorch 1000-\n",
      "62 albu/albumentations 8400+\n",
      "63 arraiyopensource/kornia 4200+\n",
      "64 s3nh/text-detector 1000-\n",
      "65 timesler/facenet-pytorch 2200+\n",
      "66 facebookresearch/detectron2 17300+\n",
      "67 Media-Smart/vedaseg 1000-\n",
      "68 facebookresearch/ClassyVision 1300+\n",
      "69 alankbi/detecto 1000-\n",
      "70 facebookresearch/pytorch3d 5000+\n",
      "71 open-mmlab/mmdetection 15700+\n",
      "72 ProGamerGov/neural-dream 1000-\n",
      "73 MisaOgura/flashtorch 1000-\n",
      "74 greentfrapp/lucent 1000-\n",
      "75 open-mmlab/mmdetection3d 1300+\n",
      "76 open-mmlab/mmsegmentation 2100+\n",
      "77 open-mmlab/mmediting 2200+\n",
      "78 open-mmlab/mmaction2 1000+\n",
      "79 open-mmlab/mmpose 1000+\n",
      "80 lightly-ai/lightly 1000+\n",
      "81 stepelu/ptstat 1000-\n",
      "82 uber/pyro 7000+\n",
      "83 probtorch/probtorch 1000-\n",
      "84 drckf/paysage 1000-\n",
      "85 ctallec/pyvarinf 1000-\n",
      "86 probprog/pyprob 1000-\n",
      "87 spring-epfl/mia 1000-\n",
      "88 akanimax/pro_gan_pytorch 1000-\n",
      "89 pytorch/botorch 2000+\n",
      "90 mrdrozdov/pytorch-extras 1000-\n",
      "91 szagoruyko/functional-zoo 1000-\n",
      "92 ncullen93/torchsample 1600+\n",
      "93 deepcraft/torchcraft-py 1000-\n",
      "94 ramon-oliveira/aorun 1000-\n",
      "95 oval-group/logger 1000-\n",
      "96 iamaziz/PyTorch-docset 1000-\n",
      "97 clcarwin/convert_torch_to_pytorch 1000-\n",
      "98 Cadene/pretrained-models.pytorch 8000+\n",
      "99 locuslab/pytorch_fft 1000-\n",
      "100 fanq15/caffe_to_torch_to_pytorch 1000-\n",
      "101 sniklaus/pytorch-extension 1000-\n",
      "102 lanpa/tensorboard-pytorch 7000+\n",
      "103 jrg365/gpytorch 2400+\n",
      "104 maciejkula/spotlight 2500+\n",
      "105 awentzonline/pytorch-cns 1000-\n",
      "106 szagoruyko/pyinn 1000-\n",
      "107 nasimrahaman/inferno 1000-\n",
      "108 henryre/pytorch-fitmodule 1000-\n",
      "109 dnouri/inferno 4000+\n",
      "404 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest/reference/repos#get-a-repository'}\n",
      "110 marvis/pytorch-caffe-darknet-convert null\n",
      "111 longcw/pytorch2caffe 1000-\n",
      "112 nearai/pytorch-tools 1000-\n",
      "113 taolei87/sru 1900+\n",
      "114 prisma-ai/torch2coreml 1000-\n",
      "115 zhanghang1989/PyTorch-Encoding 1700+\n",
      "116 ryanleary/pytorch-ctc 1000-\n",
      "117 t-vi/candlegp 1000-\n",
      "118 loudinthecloud/dpwa 1000-\n",
      "119 koz4k/dni-pytorch 1000-\n",
      "120 dnouri/skorch 4000+\n",
      "121 pytorch/ignite 3600+\n",
      "122 glample/Arnold 1000-\n",
      "123 albanie/pytorch-mcn 1000-\n",
      "124 chenyuntc/simple-faster-rcnn-pytorch 3200+\n",
      "125 DL-IT/generative_zoo 1000-\n",
      "126 szagoruyko/pytorchviz 1800+\n",
      "127 cogitare-ai/cogitare 1000-\n",
      "128 dmarnerides/pydlt 1000-\n",
      "129 wohlert/semi-supervised-pytorch 1000-\n",
      "130 rusty1s/pytorch_cluster 1000-\n",
      "131 aditya-khant/neural-assembly-compiler 1000-\n",
      "132 vadimkantorov/caffemodel2pytorch 1000-\n",
      "133 pytorch/extension-cpp 1000-\n",
      "134 GRAAL-Research/pytoune 1000-\n",
      "135 dusty-nv/jetson-reinforcement 1000-\n",
      "136 salesforce/matchbox 1000-\n",
      "137 josipd/torch-two-sample 1000-\n",
      "138 sksq96/pytorch-summary 3100+\n",
      "139 BelBES/mpl.pytorch 1000-\n",
      "404 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest'}\n",
      "140 YosefLab/scVI-dev null\n",
      "141 NVIDIA/apex 5500+\n",
      "142 pytorch/ELF 3100+\n",
      "143 EKami/Torchlite 1000-\n",
      "144 Schlumberger/joint-vae 1000-\n",
      "145 kengz/SLM-Lab 1000-\n",
      "146 Hananel-Hazan/bindsnet 1000-\n",
      "147 akanimax/pro_gan_pytorch 1000-\n",
      "148 rusty1s/pytorch_geometric 11500+\n",
      "149 knighton/torchplus 1000-\n",
      "150 zuoxingdong/lagom 1000-\n",
      "151 ecs-vlc/torchbearer 1000-\n",
      "152 tristandeleu/pytorch-maml-rl 1000-\n",
      "153 bharathgs/NALU 1000-\n",
      "154 PIQuIL/QuCumber 1000-\n",
      "155 MagNet-DL/magnet 1000-\n",
      "156 jbohnslav/opencv_transforms 1000-\n",
      "157 fastai/fastai 21100+\n",
      "158 RobotLocomotion/pytorch-dense-correspondence 1000-\n",
      "159 richzhang/colorization-pytorch 1000-\n",
      "160 cms-flash/beauty-net 1000-\n",
      "161 Mariewelt/OpenChem 1000-\n",
      "162 aiqm/torchani 1000-\n",
      "163 hjmshi/PyTorch-LBFGS 1000-\n",
      "164 cornellius-gp/gpytorch 2400+\n",
      "165 mariogeiger/hessian 1000-\n",
      "166 MillionIntegrals/vel 1000-\n",
      "167 msamogh/nonechucks 1000-\n",
      "168 Swall0w/torchstat 1000+\n",
      "169 pytorch/QNNPACK 1400+\n",
      "170 rtqichen/torchdiffeq 3600+\n",
      "171 BachiLi/redner 1000+\n",
      "172 masa-su/pixyz 1000-\n",
      "173 perone/euclidesdb 1000-\n",
      "174 nerox8664/pytorch2keras 1000-\n",
      "175 domainadaptation/salad 1000-\n",
      "176 Erotemic/netharn 1000-\n",
      "177 dmlc/dgl 7700+\n",
      "178 CSAILVision/gandissect 1600+\n",
      "179 justusschock/delira 1000-\n",
      "180 AIRLab-POLIMI/mushroom 1000-\n",
      "181 thuml/Xlearn 1000-\n",
      "182 ferrine/geoopt 1000-\n",
      "183 unit8co/vegans 1000-\n",
      "184 arraiyopensource/kornia 4200+\n",
      "185 BorealisAI/advertorch 1000-\n",
      "186 Luolc/AdaBound 2800+\n",
      "187 mblondel/fenchel-young-losses 1000-\n",
      "188 Lyken17/pytorch-OpCounter 2700+\n",
      "189 kaihsin/Tor10 1000-\n",
      "190 catalyst-team/catalyst 2600+\n",
      "191 facebook/Ax 1500+\n",
      "192 achaiah/pywick 1000-\n",
      "193 kakaobrain/torchgpipe 1000-\n",
      "194 pytorch/hub 1000+\n",
      "195 williamFalcon/pytorch-lightning 14600+\n",
      "196 kaihsin/Tor10 1000-\n",
      "197 microsoft/tensorwatch 3100+\n",
      "198 fancompute/wavetorch 1000-\n",
      "199 ag14774/diffdist 1000-\n",
      "200 awwong1/torchprof 1000-\n",
      "201 oxfordcontrol/osqpth 1000-\n",
      "202 mctorch/mctorch 1000-\n",
      "203 noahgolmant/pytorch-hessian-eigenthings 1000-\n",
      "204 StanfordVL/MinkowskiEngine 1200+\n",
      "205 Omegastick/pytorch-cpp-rl 1000-\n",
      "206 BloodAxe/pytorch-toolbelt 1000+\n",
      "207 Fonbet/argus-tensor-stream 1000-\n",
      "208 hal3/macarico 1000-\n",
      "209 astooke/rlpyt 1900+\n",
      "210 blue-season/pywarm 1000-\n",
      "211 learnables/learn2learn 1300+\n",
      "212 facebookresearch/torchbeast 1000-\n",
      "213 facebookresearch/higher 1100+\n",
      "404 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest'}\n",
      "214 Vermeille/Torchelie/ null\n",
      "215 facebookresearch/CrypTen 1000-\n",
      "216 cvxgrp/cvxpylayers 1000+\n",
      "217 HobbitLong/RepDistiller 1000+\n",
      "218 NVIDIAGameWorks/kaolin 2500+\n",
      "219 BasBuller/PySNN 1000-\n",
      "220 dmmiller612/sparktorch 1000-\n",
      "221 KevinMusgrave/pytorch-metric-learning 3400+\n",
      "222 cpnota/autonomous-learning-library 1000-\n",
      "223 asappresearch/flambe 1000-\n",
      "224 jettify/pytorch-optimizer 1900+\n",
      "225 AntixK/PyTorch-VAE 2200+\n",
      "226 ray-project/ray 16700+\n",
      "227 benedekrozemberczki/pytorch_geometric_temporal 1000-\n",
      "228 GRAAL-Research/poutyne 1000-\n",
      "229 PistonY/torch-toolbox 1000-\n",
      "230 pytorch/contrib 1000-\n",
      "231 lukemelas/EfficientNet-PyTorch 6200+\n",
      "232 pytorch/xla 1300+\n",
      "233 tmbdev/webdataset 1000-\n",
      "234 Media-Smart/volksdep 1000-\n",
      "235 POSTECH-CVLab/PyTorch-StudioGAN 1700+\n",
      "404 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest'}\n",
      "236 torchdrift/torchdrift/ null\n",
      "237 huggingface/accelerate 1600+\n",
      "238 PyTorchLightning/lightning-transformers 1000-\n",
      "239 spro/practical-pytorch 4200+\n",
      "240 yunjey/pytorch-tutorial 21300+\n",
      "241 keon/pytorch-exercises 1000-\n",
      "242 pytorch/tutorials 5200+\n",
      "243 pytorch/examples 16500+\n",
      "244 napsternxg/pytorch-practice 1000-\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "245 vinhkhuc/PyTorch-Mini-Tutorials 1000-\n",
      "246 xiayandi/Pytorch_text_classification 1000-\n",
      "247 desimone/pytorch-cat-vs-dogs 1000-\n",
      "248 eladhoffer/convNet.pytorch 1000-\n",
      "249 mailmahee/pytorch-generative-adversarial-networks 1000-\n",
      "250 amdegroot/pytorch-containers 1000-\n",
      "251 cemoody/topicsne 1000-\n",
      "252 fducau/AAE_pytorch 1000-\n",
      "253 GunhoChoi/Kind_PyTorch_Tutorial 1000-\n",
      "254 justdark/pytorch-poetry-gen 1000-\n",
      "255 JamesChuanggg/pytorch-REINFORCE 1000-\n",
      "256 MorvanZhou/PyTorch-Tutorial 6100+\n",
      "257 joansj/pytorch-intro 1000-\n",
      "258 bearpaw/pytorch-classification 1300+\n",
      "259 hardmaru/pytorch_notebooks 1000-\n",
      "260 soravux/pytorch_tutorial 1000-\n",
      "261 Spandan-Madan/Pytorch_fine_tuning_Tutorial 1000-\n",
      "262 Kyubyong/pytorch_exercises 1000-\n",
      "263 soumith/traffic-sign-detection-homework 1000-\n",
      "264 Js-Mim/mss_pytorch 1000-\n",
      "265 DSKSD/DeepNLP-models-Pytorch 2600+\n",
      "266 mila-udem/welcome_tutorials 1000-\n",
      "267 moskomule/pytorch.rl.learning 1000-\n",
      "268 keon/seq2seq 1000-\n",
      "269 JeanKossaifi/tensorly-notebooks 1000-\n",
      "270 jpeg729/pytorch_bits 1000-\n",
      "271 sanyam5/skip-thoughts 1000-\n",
      "272 xiadingZ/video-caption-pytorch 1000-\n",
      "273 higgsfield/Capsule-Network-Tutorial 1000-\n",
      "274 SherlockLiao/code-of-learn-deep-learning-with-pytorch 2100+\n",
      "275 higgsfield/RL-Adventure 2300+\n",
      "276 hpcgarage/accelerated_dl_pytorch 1000-\n",
      "277 higgsfield/RL-Adventure-2 2500+\n",
      "278 wkentaro/pytorch-for-numpy-users 1000-\n",
      "279 Kaixhin/grokking-pytorch 1000-\n",
      "280 Atcold/PyTorch-Deep-Learning-Minicourse 5200+\n",
      "281 utkuozbulak/pytorch-custom-dataset-examples 1000-\n",
      "282 furkanu/deeplearning.ai-pytorch 1000-\n",
      "283 tobiascz/MNIST_Pytorch_python_and_capi 1000-\n",
      "284 ne7ermore/torch_light 1000-\n",
      "285 dribnet/portrain-gan 1000-\n",
      "286 omarsar/mri-analysis-pytorch 1000-\n",
      "287 davidcpage/cifar10-fast 1000-\n",
      "288 bentrevett/pytorch-sentiment-analysis 2900+\n",
      "289 rwightman/pytorch-image-models 11800+\n",
      "290 BIGBALLON/CIFAR-ZOO 1000-\n",
      "291 dsgiitr/d2l-pytorch 3700+\n",
      "292 stared/thinking-in-tensors-writing-in-pytorch 1000-\n",
      "293 lemonhu/NER-BERT-pytorch 1000-\n",
      "294 dougsouza/pytorch-sync-batchnorm-example 1000-\n",
      "295 barissayil/SentimentAnalysis 1000-\n",
      "296 prabhuomkar/pytorch-cpp 1100+\n",
      "297 lab-ml/nn 3200+\n",
      "298 neuralix/google_evolution 1000-\n",
      "299 edouardoyallon/pyscatwave 1000-\n",
      "300 edouardoyallon/scalingscattering 1000-\n",
      "301 episodeyang/deep-auto-punctuation 1000-\n",
      "302 tensorboy/pytorch_Realtime_Multi-Person_Pose_Estimation 1100+\n",
      "303 onlytailei/PyTorch-value-iteration-networks 1000-\n",
      "304 analvikingur/pytorch_Highway 1000-\n",
      "305 analvikingur/pytorch_NEG_loss 1000-\n",
      "306 analvikingur/pytorch_RVAE 1000-\n",
      "307 analvikingur/pytorch_TDNN 1000-\n",
      "308 moskomule/eve.pytorch 1000-\n",
      "309 locuslab/e2e-model-learning 1000-\n",
      "310 mrzhu-cool/pix2pix-pytorch 1000-\n",
      "311 amdegroot/ssd.pytorch 4300+\n",
      "312 carpedm20/DiscoGAN-pytorch 1000-\n",
      "313 SKTBrain/DiscoGAN 1000-\n",
      "314 atgambardella/pytorch-es 1000-\n",
      "315 bodokaiser/piwise 1000-\n",
      "316 transedward/pytorch-dqn 1000-\n",
      "317 ruotianluo/neuraltalk2.pytorch 1000+\n",
      "318 mattmacy/vnet.pytorch 1000-\n",
      "319 wkentaro/pytorch-fcn 1400+\n",
      "320 xternalz/WideResNet-pytorch 1000-\n",
      "321 c0nn3r/pytorch_highway_networks 1000-\n",
      "322 ypxie/pytorch-NeuCom 1000-\n",
      "323 eladhoffer/captionGen 1000-\n",
      "324 jayleicn/animeGAN 1100+\n",
      "325 Shawn1993/cnn-text-classification-pytorch 1000-\n",
      "326 SeanNaren/deepspeech.pytorch 1700+\n",
      "327 MaximumEntropy/Seq2Seq-PyTorch 1000-\n",
      "328 rarilurelo/pytorch_a3c 1000-\n",
      "329 bamos/densenet.pytorch 1000-\n",
      "330 alykhantejani/nninit 1000-\n",
      "331 longcw/faster_rcnn_pytorch 1500+\n",
      "332 akolishchak/doom-net-pytorch 1000-\n",
      "333 ClementPinard/FlowNetPytorch 1000-\n",
      "334 gsp-27/pytorch_Squeezenet 1000-\n",
      "335 martinarjovsky/WassersteinGAN 2800+\n",
      "336 locuslab/optnet 1000-\n",
      "337 locuslab/qpth 1000-\n",
      "338 ikostrikov/pytorch-naf 1000-\n",
      "339 ikostrikov/pytorch-meta-optimizer 1000-\n",
      "340 darkstar112358/fast-neural-style 1000-\n",
      "341 leongatys/PytorchNeuralStyleTransfer 1000-\n",
      "342 bengxy/FastNeuralStyle 1000-\n",
      "343 alexis-jacq/Pytorch-Tutorials 1000-\n",
      "344 zuoxingdong/VIN_PyTorch_Visdom 1000-\n",
      "345 longcw/yolo2-pytorch 1400+\n",
      "346 szagoruyko/attention-transfer 1200+\n",
      "347 potterhsu/SVHNClassifier-PyTorch 1000-\n",
      "348 oeway/pytorch-deform-conv 1000-\n",
      "349 carpedm20/BEGAN-pytorch 1000-\n",
      "350 dasguptar/treelstm.pytorch 1000-\n",
      "351 DmitryUlyanov/AGE 1000-\n",
      "352 prlz77/ResNeXt.pytorch 1000-\n",
      "353 jingweiz/pytorch-rl 1000-\n",
      "354 sujithv28/Deep-Leafsnap 1000-\n",
      "355 junyanz/pytorch-CycleGAN-and-pix2pix 15400+\n",
      "356 onlytailei/A3C-PyTorch 1000-\n",
      "357 kentsommer/pytorch-value-iteration-networks 1000-\n",
      "358 zhanghang1989/PyTorch-Style-Transfer 1000-\n",
      "359 isht7/pytorch-deeplab-resnet 1000-\n",
      "360 fxia22/pointnet.pytorch 1100+\n",
      "361 aaron-xichen/pytorch-playground 2100+\n",
      "362 jingweiz/pytorch-dnc 1000-\n",
      "363 jinfagang/pytorch_image_classifier 1000-\n",
      "364 yunjey/mnist-svhn-transfer 1000-\n",
      "404 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest/reference/repos#get-a-repository'}\n",
      "365 marvis/pytorch-yolo2 null\n",
      "366 andrewliao11/dni.pytorch 1000-\n",
      "367 caogang/wgan-gp 1200+\n",
      "368 spro/pytorch-seq2seq-intent-parsing 1000-\n",
      "369 demelin/pyTorch_NCE 1000-\n",
      "370 cxhernandez/molencoder 1000-\n",
      "371 stormraiser/GAN-weight-norm 1000-\n",
      "372 rachtsingh/lgamma 1000-\n",
      "373 eladhoffer/bigBatch 1000-\n",
      "374 dgriff777/rl_a3c_pytorch 1000-\n",
      "375 ahirner/pytorch-retraining 1000-\n",
      "376 priba/nmp_qc 1000-\n",
      "377 jacobgil/pytorch-grad-cam 2900+\n",
      "404 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest/reference/repos#get-a-repository'}\n",
      "378 mjacar/pytorch-trpo null\n",
      "379 jacobgil/pytorch-explain-black-box 1000-\n",
      "380 jmtomczak/vae_vpflows 1000-\n",
      "381 kimhc6028/relational-networks 1000-\n",
      "382 Cadene/vqa.pytorch 1000-\n",
      "383 facebookresearch/end-to-end-negotiator 1300+\n",
      "384 ShiyuLiang/odin-pytorch 1000-\n",
      "385 ajbrock/FreezeOut 1000-\n",
      "386 jakezhaojb/ARAE 1000-\n",
      "387 kimhc6028/forward-thinking-pytorch 1000-\n",
      "388 BoyuanJiang/context_encoder_pytorch 1000-\n",
      "389 jadore801120/attention-is-all-you-need-pytorch 5500+\n",
      "390 thnkim/OpenFacePytorch 1000-\n",
      "391 pemami4911/neural-combinatorial-rl-pytorch 1000-\n",
      "404 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest/reference/repos#get-a-repository'}\n",
      "392 mjacar/pytorch-nec null\n",
      "393 eladhoffer/seq2seq.pytorch 1000-\n",
      "394 alexis-jacq/Pytorch-Sketch-RNN 1000-\n",
      "395 jacobgil/pytorch-pruning 1000-\n",
      "396 hitvoice/DrQA 1000-\n",
      "397 JianGoForIt/YellowFin_Pytorch 1000-\n",
      "398 deepsound-project/samplernn-pytorch 1000-\n",
      "399 tymokvo/AEGeAN 1000-\n",
      "400 twtygqyy/pytorch-SRResNet 1000-\n",
      "401 fartashf/vsepp 1000-\n",
      "402 alexis-jacq/Pytorch-DPPO 1000-\n",
      "403 mingyuliutw/UNIT 1700+\n",
      "404 gpleiss/efficient_densenet_pytorch 1300+\n",
      "405 yjxiong/tsn-pytorch 1000-\n",
      "406 ajbrock/SMASH 1000-\n",
      "407 kuangliu/pytorch-retinanet 1000-\n",
      "408 aosokin/biogans 1000-\n",
      "404 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest/reference/repos#get-a-repository'}\n",
      "409  woozzu/dong_iccv_2017 null\n",
      "410 jmhessel/fmpytorch 1000-\n",
      "411 ZhouYanzhao/ORN 1000-\n",
      "412 katerakelly/pytorch-maml 1000-\n",
      "413 znxlwm/pytorch-generative-model-collections 2200+\n",
      "414 markdtw/vqa-winner-cvprw-2017 1000-\n",
      "415 r9y9/tacotron_pytorch 1000-\n",
      "416 Lextal/pspnet-pytorch 1000-\n",
      "417 LiyuanLucasLiu/LM-LSTM-CRF 1000-\n",
      "418 1adrianb/face-alignment 5000+\n",
      "419 ClementPinard/DepthNet 1000-\n",
      "420 thstkdgus35/EDSR-PyTorch 1600+\n",
      "421 ethanluoyc/e2c-pytorch 1000-\n",
      "422 kenshohara/3D-ResNets-PyTorch 2900+\n",
      "423 khanhptnk/bandit-nmt 1000-\n",
      "424 ikostrikov/pytorch-a2c-ppo-acktr 2400+\n",
      "425 baldassarreFe/zalando-pytorch 1000-\n",
      "426 clcarwin/sphereface_pytorch 1000-\n",
      "427 floringogianu/categorical-dqn 1000-\n",
      "428 loudinthecloud/pytorch-ntm 1000-\n",
      "404 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest/reference/repos#get-a-repository'}\n",
      "429 felixgwu/mask_rcnn_pytorch null\n",
      "430 xbresson/graph_convnets_pytorch 1000-\n",
      "431 ruotianluo/pytorch-faster-rcnn 1700+\n",
      "432 huggingface/torchMoji 1000-\n",
      "433 hangzhaomit/semantic-segmentation-pytorch 3900+\n",
      "434 salesforce/pytorch-qrnn 1200+\n",
      "435 theeluwin/pytorch-sgns 1000-\n",
      "436 ClementPinard/SfmLearner-Pytorch 1000-\n",
      "437 1zb/deformable-convolution-pytorch 1000-\n",
      "438 fanglanting/skip-gram-pytorch 1000-\n",
      "439 hanzhanggit/StackGAN-v2 1000-\n",
      "440 ruotianluo/self-critical.pytorch 1000-\n",
      "441 tkipf/pygcn 3600+\n",
      "442 ixaxaar/pytorch-dnc 1000-\n",
      "443 ptrblck/prog_gans_pytorch_inference 1000-\n",
      "444 timomernick/pytorch-capsule 1000-\n",
      "445 dyhan0920/PyramidNet-PyTorch 1000-\n",
      "446 gram-ai/radio-transformer-networks 1000-\n",
      "447 castorini/honk 1000-\n",
      "448 SSARCandy/DeepCORAL 1000-\n",
      "449 bearpaw/pytorch-pose 1000-\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "450 karandesai-96/lang-emerge-parlai 1000-\n",
      "451 Kaixhin/Rainbow 1200+\n",
      "452 gdlg/pytorch_compact_bilinear_pooling 1000-\n",
      "453 DeepInsight-PCALab/CompactBilinearPooling-Pytorch 1000-\n",
      "454 gitabcworld/FewShotLearning 1000-\n",
      "455 jklj077/meProp 1000-\n",
      "456 clcarwin/SFD_pytorch 1000-\n",
      "457 facebookresearch/GradientEpisodicMemory 1000-\n",
      "458 KupynOrest/DeblurGAN 1900+\n",
      "459 yunjey/StarGAN 4800+\n",
      "460 adambielski/CapsNet-pytorch 1000-\n",
      "461 ShichenLiu/CondenseNet 1000-\n",
      "462 DmitryUlyanov/deep-image-prior 6700+\n",
      "463 natanielruiz/deep-head-pose 1100+\n",
      "464 zhunzhong07/Random-Erasing 1000-\n",
      "465 facebookresearch/FaderNetworks 1000-\n",
      "466 NVIDIA/flownet2-pytorch 2300+\n",
      "467 NVIDIA/pix2pixHD 5300+\n",
      "468 pkdn/pytorch-smoothgrad 1000-\n",
      "469 c0nn3r/RetinaNet 1000-\n",
      "470 jwyang/faster-rcnn.pytorch 6300+\n",
      "471 leehomyc/mixup_pytorch 1000-\n",
      "472 mapillary/inplace_abn 1100+\n",
      "473 xingyizhou/pytorch-pose-hg-3d 1000-\n",
      "474 HarshTrivedi/nmn-pytorch 1000-\n",
      "475 kefirski/bytenet 1000-\n",
      "476 hengyuan-hu/bottom-up-attention-vqa 1000-\n",
      "477 ruiminshen/yolo2-pytorch 1000-\n",
      "478 Wizaron/reseg-pytorch 1000-\n",
      "479 Wizaron/binary-stochastic-neurons 1000-\n",
      "480 DavexPro/pytorch-pose-estimation 1000-\n",
      "481 higgsfield/interaction_network_pytorch 1000-\n",
      "482 wlwkgus/NoisyNaturalGradient 1000-\n",
      "483 moskomule/ewc.pytorch 1000-\n",
      "484 jacobgil/pytorch-zssr 1000-\n",
      "485 atiyo/deep_image_prior 1000-\n",
      "486 leviswind/pytorch-transformer 1000-\n",
      "487 devendrachaplot/DeepRL-Grounding 1000-\n",
      "488 Wizaron/deep-forecast-pytorch 1000-\n",
      "489 utiasSTARS/cat-net 1000-\n",
      "490 tneumann/minimal_glo 1000-\n",
      "491 dragen1860/LearningToCompare-Pytorch 1000-\n",
      "492 facebookresearch/poincare-embeddings 1400+\n",
      "404 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest'}\n",
      "493 Hessian-vector product version null\n",
      "494 JamesChuanggg/ggnn.pytorch 1000-\n",
      "495 Mrgemy95/visual-interaction-networks-pytorch 1000-\n",
      "496 jhayes14/adversarial-patch 1000-\n",
      "497 orobix/Prototypical-Networks-for-Few-shot-Learning-PyTorch 1000-\n",
      "498 orobix/Visual-Feature-Attribution-Using-Wasserstein-GANs-Pytorch 1000-\n",
      "499 Blade6570/PhotographicImageSynthesiswithCascadedRefinementNetworks-Pytorch 1000-\n",
      "500 carpedm20/ENAS-pytorch 2400+\n",
      "501 kentsyx/Neural-IMage-Assessment 1000-\n",
      "502 tfrerix/proxprop 1000-\n",
      "503 NVIDIA/FastPhotoStyle 10500+\n",
      "504 Ben-Louis/Deep-Image-Analogy-PyTorch 1000-\n",
      "505 layumi/Person_reID_baseline_pytorch 2700+\n",
      "506 zalandoresearch/pt-dilate-rnn 1000-\n",
      "507 jhjacobsen/pytorch-i-revnet 1000-\n",
      "508 Orcuslc/OrthNet 1000-\n",
      "509 jt827859032/DRRN-pytorch 1000-\n",
      "510 moskomule/shampoo.pytorch 1000-\n",
      "511 truskovskiyk/nima.pytorch 1000-\n",
      "512 locuslab/TCN 2900+\n",
      "513 shahsohil/DCC 1000-\n",
      "514 arunmallya/packnet 1000-\n",
      "515 github-pengge/PyTorch-progressive_growing_of_gans 1000-\n",
      "516 salesforce/nonauto-nmt 1000-\n",
      "517 eriklindernoren/PyTorch-GAN 9800+\n",
      "518 tomrunia/PyTorchWavelets 1000-\n",
      "519 karpathy/pytorch-made 1000-\n",
      "520 emited/VariationalRecurrentNeuralNetwork 1000-\n",
      "521 emited/flow 1000-\n",
      "522 r9y9/deepvoice3_pytorch 1600+\n",
      "523 elanmart/psmm 1000-\n",
      "524 NVIDIA/tacotron2 3000+\n",
      "525 rahulkidambi/AccSGD 1000-\n",
      "526 hengruo/QANet-pytorch 1000-\n",
      "527 TimDettmers/ConvE 1000-\n",
      "528 kaushalshetty/Structured-Self-Attention 1000-\n",
      "529 williamleif/graphsage-simple 1000-\n",
      "530 roytseng-tw/Detectron.pytorch 2800+\n",
      "531 irhumshafkat/R2Plus1D-PyTorch 1000-\n",
      "532 viking-sudo-rm/StackNN 1000-\n",
      "533 facebookresearch/translagent 1000-\n",
      "534 jnhwkim/ban-vqa 1000-\n",
      "535 huggingface/pytorch-openai-transformer-lm 1200+\n",
      "536 akanimax/T2F 1000-\n",
      "537 mseitzer/pytorch-fid 1300+\n",
      "538 jmtomczak/vae_vpflows 1000-\n",
      "539 mkocabas/CoordConv-pytorch 1000-\n",
      "540 xternalz/SDPoint 1000-\n",
      "541 wxywhu/SRDenseNet-pytorch 1000-\n",
      "542 LMescheder/GAN_stability 1000-\n",
      "543 wannabeOG/Mask-RCNN 1000-\n",
      "544 chaoyuaw/pytorch-coviar 1000-\n",
      "545 chenxi116/PNASNet.pytorch 1000-\n",
      "546 kevinzakka/NALU-pytorch 1000-\n",
      "547 alexis-jacq/LOLA_DiCE 1000-\n",
      "548 wohlert/generative-query-network-pytorch 1000-\n",
      "549 wmvanvliet/pytorch_hmax 1000-\n",
      "550 yunlongdong/FCN-pytorch-easiest 1000-\n",
      "551 awni/transducer 1000-\n",
      "552 artix41/AVO-pytorch 1000-\n",
      "553 huguyuehuhu/HCN-pytorch 1000-\n",
      "554 szagoruyko/binary-wide-resnet 1000-\n",
      "555 arunmallya/piggyback 1000-\n",
      "556 NVIDIA/vid2vid 7700+\n",
      "557 cranmer/poisson-convolution-sum 1000-\n",
      "558 davidmascharka/tbd-nets 1000-\n",
      "559 elbayadm/attn2d 1000-\n",
      "560 ultralytics/yolov3 7500+\n",
      "561 duc0/deep-dream-in-pytorch 1000-\n",
      "562 ikostrikov/pytorch-flows 1000-\n",
      "563 ars-ashuha/quantile-regression-dqn-pytorch 1000-\n",
      "564 L0SG/relational-rnn-pytorch 1000-\n",
      "565 scaelles/DEXTR-PyTorch 1000-\n",
      "566 rdspring1/PyTorch_GBW_LM 1000-\n",
      "567 Stonesjtu/Pytorch-NCE 1000-\n",
      "568 shayneobrien/generative-models 1000-\n",
      "569 andreasveit/convnet-aig 1000-\n",
      "570 TianhongDai/integrated-gradient-pytorch 1000-\n",
      "571 Alexander-H-Liu/MalConv-Pytorch 1000-\n",
      "572 locuslab/trellisnet 1000-\n",
      "573 minqi/learning-to-communicate-pytorch 1000-\n",
      "574 michaelklachko/pnn.pytorch 1000-\n",
      "575 rainofmine/Face_Attention_Network 1000-\n",
      "576 NVIDIA/waveglow 1800+\n",
      "577 facebookresearch/deepfloat 1000-\n",
      "578 subeeshvasu/2018_subeesh_epsr_eccvw 1000-\n",
      "579 ksw0306/ClariNet 1000-\n",
      "580 huggingface/pytorch-pretrained-BERT 48900+\n",
      "581 npuichigo/waveglow 1000-\n",
      "582 cleardusk/3DDFA 3000+\n",
      "583 tomgoldstein/loss-landscape 1600+\n",
      "584 zalandoresearch/famos 1000-\n",
      "585 anuragranj/back2future.pytorch 1000-\n",
      "586 mozilla/FFTNet 1000-\n",
      "587 zisianw/FaceBoxes.PyTorch 1000-\n",
      "588 kimiyoung/transformer-xl 2900+\n",
      "589 jalexvig/associative_compression_networks 1000-\n",
      "590 jolibrain/fluidnet_cxx 1000-\n",
      "591 p-christ/Deep-Reinforcement-Learning-Algorithms-with-PyTorch 3700+\n",
      "592 ericsun99/Shufflenet-v2-Pytorch 1000-\n",
      "593 benedekrozemberczki/GraphWaveletNeuralNetwork 1000-\n",
      "594 benedekrozemberczki/AttentionWalk 1000-\n",
      "595 benedekrozemberczki/SGCN 1000-\n",
      "596 benedekrozemberczki/SINE 1000-\n",
      "597 benedekrozemberczki/GAM 1000-\n",
      "598 ProGamerGov/neural-style-pt 1000-\n",
      "599 ibalazevic/TuckER 1000-\n",
      "600 BayesWatch/pytorch-prunes 1000-\n",
      "601 benedekrozemberczki/SimGNN 1000-\n",
      "602 ahmedbesbes/character-based-cnn 1000-\n",
      "603 facebookresearch/XLM 2400+\n",
      "604 eth-sri/diffai 1000-\n",
      "605 benedekrozemberczki/APPNP 1000-\n",
      "606 benedekrozemberczki/MixHop-and-N-GCN 1000-\n",
      "607 graykode/gpt-2-Pytorch 1000-\n",
      "608 benedekrozemberczki/Splitter 1000-\n",
      "609 benedekrozemberczki/CapsGNN 1000+\n",
      "610 ajbrock/BigGAN-PyTorch 2300+\n",
      "611 mhubii/ppo_pytorch_cpp 1000-\n",
      "612 seungwonpark/RandWireNN 1000-\n",
      "613 joel-huang/zeroshot-capsnet-pytorch 1000-\n",
      "614 benedekrozemberczki/SEAL-CI 1000-\n",
      "615 benedekrozemberczki/MixHop-and-N-GCN 1000-\n",
      "616 Lotayou/densebody_pytorch 1000-\n",
      "617 mindslab-ai/voicefilter 1000-\n",
      "618 NVIDIA/semantic-segmentation 1300+\n",
      "619 benedekrozemberczki/ClusterGCN 1000-\n",
      "620 NVlabs/DG-Net 1000+\n",
      "621 baidu-research/NCRF 1000-\n",
      "622 ducha-aiki/pytorch-sift 1000-\n",
      "623 mateuszbuda/brain-segmentation-pytorch 1000-\n",
      "624 rosinality/glow-pytorch 1000-\n",
      "625 zsef123/EfficientNets-PyTorch 1000-\n",
      "626 nv-tlabs/STEAL 1000-\n",
      "627 alecwangcq/EigenDamage-Pytorch 1000-\n",
      "628 ruidan/Aspect-level-sentiment 1000-\n",
      "629 nyukat/breast_cancer_classifier 1000-\n",
      "630 AaltoVision/DGC-Net 1000-\n",
      "631 Eric-Wallace/universal-triggers 1000-\n",
      "632 p-christ/Deep-Reinforcement-Learning-Algorithms-with-PyTorch 3700+\n",
      "633 alibaba-edu/simple-effective-text-matching-pytorch 1000-\n",
      "404 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest'}\n",
      "634 ASMA null\n",
      "635 NVIDIA/unsupervised-video-interpolation 1000-\n",
      "636 layumi/Seg-Uncertainty 1000-\n",
      "637 adamian98/pulse 5700+\n",
      "638 snap-stanford/distance-encoding 1000-\n",
      "639 benedekrozemberczki/PDN 1000-\n",
      "640 pykeen/pykeen 1000-\n",
      "641 ritchieng/the-incredible-pytorch 8300+\n",
      "642 wiseodd/generative-models 6500+\n",
      "404 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest'}\n",
      "643 https://hub.docker.com/r/escong/pytorch-notebook/ null\n",
      "644 kendricktan/drawlikebobross 1000-\n",
      "645 t-vi/pytorch-tvmisc 1000-\n",
      "646 andrewliao11/pytorch-a3c-mujoco 1000-\n",
      "647 jinfagang/pytorch_chatbot 1000-\n",
      "648 Kaixhin/malmo-challenge 1000-\n",
      "649 jtoy/sketchnet 1000-\n",
      "650 QuantScientist/Deep-Learning-Boot-Camp 1200+\n",
      "651 mratsim/Amazon_Forest_Computer_Vision 1000-\n",
      "652 junxiaosong/AlphaZero_Gomoku 2400+\n",
      "404 {'message': 'Not Found', 'documentation_url': 'https://docs.github.com/rest/reference/repos#get-a-repository'}\n",
      "653 youansheng/pytorch-cv null\n",
      "654 KaiyangZhou/deep-person-reid 2800+\n",
      "655 victoresque/pytorch-template 2700+\n",
      "656 svishnu88/DLwithPyTorch 1000-\n",
      "657 jalola/compare-tensorflow-pytorch 1000-\n",
      "658 hasktorch/hasktorch 1000-\n",
      "659 fragcolor-xyz/nimtorch 1000-\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "660 John-Ellis/derplearning 1000-\n",
      "661 tugstugi/pytorch-saltnet 1000-\n",
      "662 peterjc123/pytorch-scripts 1000-\n",
      "663 ptrblck/pytorch_misc 1000-\n",
      "664 arnas/awesome-pytorch-scholarship 1000-\n",
      "665 mmirman/MentisOculi 1000-\n",
      "666 karanchahal/DoodleMaster 2400+\n",
      "667 LaurentMazare/ocaml-torch 1000-\n",
      "668 pytorch/extension-script 1000-\n",
      "669 zccyman/pytorch-inference 1000-\n",
      "670 Wizaron/pytorch-cpp-inference 1000-\n",
      "671 LaurentMazare/tch-rs 1100+\n",
      "672 interesaaat/TorchSharp 1000-\n",
      "673 ml-tooling/ml-workspace 2000+\n",
      "674 IgorSusmelj/pytorch-styleguide 1100+\n"
     ]
    }
   ],
   "source": [
    "fin = open(\"lists.txt\", \"r+\")\n",
    "print (\"文件名为: \", fin.name)\n",
    "\n",
    "fout = open(\"result.txt\", \"w+\")\n",
    "\n",
    "line = fin.readline()\n",
    "i = 0\n",
    "while line:   \n",
    "    if \"https://github.com/\" in line:\n",
    "        stars_str = re.findall(pl, line)[0]\n",
    "        repo_name = re.findall(pat, line)[0].replace(\"https://github.com/\", \"\")\n",
    "        stars = \"\"\n",
    "        try: \n",
    "            repo = g.get_repo(repo_name)\n",
    "            time.sleep(1)\n",
    "            star_count = repo.stargazers_count\n",
    "            if star_count < 1000:\n",
    "                stars = \"1000-\"\n",
    "            else:\n",
    "                stars = str(star_count - star_count%100) + \"+\"\n",
    "        except Exception as e:\n",
    "            print(e)\n",
    "            stars = \"null\"\n",
    "        i += 1\n",
    "        print(i, repo_name, stars)\n",
    "        line = line.replace(stars_str, \" <kbd>{}</kbd> \".format(stars), 1)\n",
    "#     print(line)\n",
    "        \n",
    "    fout.write(line)\n",
    "    line = fin.readline()   \n",
    "    \n",
    "fout.close()\n",
    "fin.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# try: \n",
    "#     repo = g.get_repo(\"YosefLab/scVI-dev\")\n",
    "#     print(repo.stargazers_count)\n",
    "# except Exception:\n",
    "#     print(\"null\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
